#include<cstdio>
using namespace std;
int main()
{
	int m, s = 0, i = 0;
	scanf("%d", &m);
	while (s < m)
	{
		s += ++i;
	}
	printf("%d", i);
	return 0;
}
